//
//  SmileWebViewController.m
//  FVQuickMessage
//
//  Created by dllo on 16/8/22.
//  Copyright © 2016年 zty. All rights reserved.
//

#import "SmileWebViewController.h"
#import "SmileModel.h"
#import <WebKit/WebKit.h>


@interface SmileWebViewController ()

@property (nonatomic, retain) WKWebView *wkWebView;

@end

@implementation SmileWebViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    [self config];
    
    [self createWebView];
    
}

-(void)config {
    
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationItem.title = @"详情";
    self.navigationController.navigationBar.translucent = NO;
    
}

-(void)createWebView {
    
    NSString *str = [self.smileModel.html objectForKey:@"source_url"];
    
    self.wkWebView = [[WKWebView alloc] initWithFrame:self.view.bounds];
    [self.view addSubview:_wkWebView];
    self.wkWebView.scrollView.backgroundColor = [UIColor whiteColor];
    [self.wkWebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:str]]];
    
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
